package com.zjbbkj.baibai.netty.message.factory;

import io.netty.channel.Channel;

/**
 * @author WanLi
 * @date 2021年08月24日 17:19
 */
public class calculateUsingFactory {

    public static void calculateUsingFactory(String message, Channel channel, String operator) {
        Operation targetOperation = OperatorFactory
                .getOperation(operator)
                .orElseThrow(() -> new IllegalArgumentException("Invalid Operator"));
        targetOperation.parsingMsg(message, channel);
    }
}
